import Vue from 'vue';
import Vuex from 'vuex';
import category from './module/category.js';
import newslist from './module/newslist.js';

Vue.use(Vuex);

export default new Vuex.Store({
  state: {},
  mutations: {},
  actions: {},
  // // 为了添加子模块内部state数据了快捷访问方式
  // getters: {
  //   categoryList: (state) => state.category.list,
  //   currentCategory: (state) => state.category.current,
  // },
  modules: {
    category,
    newslist,
  },
});
